home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / wb / czesc_2 / ml / man / dos / wait < prev   
Text File  |  1993-01-23  |  2KB  |  65 lines

  1. WAIT(1)                         DOS COMMANDS                         WAIT(1)
  2.  
  3. NAME
  4.      WAIT : To wait for a few seconds or minutes.
  5.  
  6. SYNOPSIS
  7.      WAIT [<n>] [SEC|SECS] [MIN|MINS] [UNTIL <time>]
  8.  
  9. TEMPLATE
  10.      WAIT ",SEC=SECS/S, MIN=MINS/S, UNTIL/K"
  11.  
  12. PATH
  13.      C:
  14.  
  15. DESCRIPTION
  16.            WAIT as its name suggests, waits for a few seconds or minutes.
  17.      WAIT without argument WAITs for 1 second. WAIT N, where N is a number 
  18.      will WAIT for N seconds. It is possible to specify a number of minutes 
  19.      to WAIT by adding MIN or MINS after the argument.
  20.            With the UNTIL option it is possible to wait up to a given time.
  21.      WAIT is useful to launch tasks in the background at specific time,
  22.      or at specific intervals.
  23.            Wait can be used to wait for the end of a script file. This is 
  24.      done for example in the default Startup-sequence file. This can be used 
  25.      when a script file runs another script files and that both of them 
  26.      access the disk very much. This way, the first script file, can wait
  27.      until the second script file has completed at least part of what it
  28.      has to do. Typically the first script file will WAIT and the second one
  29.      sends it a BREAK signal to inform it that it can continue.
  30.            WAIT can also be used to synchronize one or more script files.
  31.  
  32. OPTIONS
  33.      N : the amount of time to wait. By default N is the number of seconds
  34.            to wait. N can be followed by SEC or SECS to be more explicit.
  35.            If N is followed by MIN or MINS, WAIT will wait for N minutes.
  36.  
  37.      UNTIL: WAIT until the specified time.
  38.  
  39. SEE ALSO
  40.      BREAK, RUN.
  41.  
  42. EXAMPLE
  43.      The following script file can be run in the background to save every
  44.      15 minutes all the files on the RAM: disk into the SYS:Rescued_Files
  45.      directory. This is one way to minimize the risk of loosing hours of
  46.      work because of a GURU.
  47.  
  48.      LAB Loop
  49.       WAIT 15 MINS
  50.      COPY ram:#? SYS:Rescued_Files ALL
  51.      SKIP Loop BACK
  52.  
  53.      This example shows how WAIT can be used to WAIT for the end of another
  54.      program through a script:
  55.      LaunchScript:
  56.       MyProgram ; this is the program we want to run and wait for.
  57.       BREAK 1 C ; 1 is the SHELL/CLI number from which this script is RUN.
  58.       AnotherProgram ; we don't wait for this one.
  59.  
  60.      The other script:
  61.       run execute LaunchScript
  62.       WAIT >NIL: 5 MIN ; wait up to 5 MIN or until the BREAK signal send
  63.                        ; by the other script file is received.
  64.  
  65.